|
|
 |
|
|
|
|
64: 'used when assigning a value to the property, on the left side of an assignment.
65: 'Syntax: X.DBConnect = 5
66: mvarDBConnect = vData
67: End Property
68:
69:
70: '##ModelId=352AB4CA01CC
71: Public Property Get DBConnect() As String
72: 'used when retrieving value of a property, on the right side of an assignment.
73: 'Syntax: Debug.Print X.DBConnect
74: DBConnect = mvarDBConnect
75: End Property
76:
77:
78:
79: '##ModelId=352AB4CB026C
80: Public Property Set pDBConnection(ByVal vData As Object)
81: 'used when assigning an Object to the property, on the left side of a Set statement.
82: 'Syntax: Set x.pDBConnection = Form1
83: Set mvarpDBConnection = vData
84: End Property
85:
86:
87: '##ModelId=352AB4CB0154
88: Public Property Get pDBConnection() As ADODB.Connection
89: 'used when retrieving value of a property, on the right side of an assignment.
90: 'Syntax: Debug.Print X.pDBConnection
91: Set pDBConnection = mvarpDBConnection
92: End Property
93:
94:
95:
96: '##ModelId=352AB4CC003C 'Executes a SQL statement
97: Public Function executeSQL(argSQL As String) As Variant
98: Dim lRecordsAffected As Long
99: With mvarpDBConnection
100: .Execute argSQL, lRecordsAffected
101: End With
102: MsgBox Records affected; & CStr(lRecordsAffected)
103: End Function
104:
105: '##ModelId=352AB4CC01B8 'Opens a connection using DSN
106: Public Sub openConnectionWithDSN(argConnStr As String) 'As Variant
107: On Error GoTo openConnectionErr
|
|
|
|
|
|